<!--#include file="top.php" -->
<script type="text/javascript" src="../misc/vendors/jquery/autocomplete/eautocomplete.js"></script>
 
<div style="margin:0 auto;width:800px;border:1px dashed #999999;padding:10px;">
	查询关键字：<input type="text" id="zhou" style="width:600px;" />
	<br />	<br />
	查询结果纪录：
	<textarea id="result_id" style="width:600px;height:200px"></textarea>
</div>
<script type="text/javascript">
$().ready(function(){
	$("#zhou").autocomplete('<?=url('test','test_autocomplete')?>', {
		formatItem: function(row, i, max) {
			return '共'+max+'条,第'+i+'条： '+row[0]+' '+row[1]+' '+row[2];
		},
		formatResult: function(data, value) {
			return data[2];
		},
		onSelect: function(event, data, formatted){
			var htmls = '发现一次查询返回：'+formatted;
			for(var i=0 ; i<data.length ; i++){
				htmls += '\n  数据'+(i+1)+'：'+data[i]+'   ';
			}
			htmls += '\n';
 			$('#result_id').append(htmls);
		}
	});
});
	 
</script>
<!--#include file="bottom.php" -->